package top.continew.admin.controller.qywx;

import cn.shengchao.examstar.rpc.wecom.api.LocalToWeComRequestApi;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.continew.starter.web.model.R;

/**
 * @program: examstar-manger-api
 * @description: 企业微信调用测试
 * @author: Xiong weiqiang
 * @create: 2025-04-10 15:26
 */
@Tag(name = "企微-企业微信调用测试")
@RestController
@RequestMapping("/qywx/weCom")
public class WeComReqController {
    @DubboReference
    LocalToWeComRequestApi localToWeComRequestApi;
    /**
     * 成员企微请求更新
     * @param weComUserId
     * @return
     */
    @Operation(summary = "成员企微号绑定删除", description = "成员企微号绑定删除")
    @PostMapping("/updateCpUser/{weComUserId}")
    R updateCpUser(@PathVariable String weComUserId) {
        localToWeComRequestApi.syncCpUserInfo(weComUserId);
        return R.ok();
    }
}